SPA_RESOLVE_INIT = function(transition) {
    var html = '<table class="Table_common problemListTab mt-20">\n' +
        '<thead>\n' +
        '<tr>\n' +
        '<td>id</td>\n' +
        '<td>标题</td>\n' +
        '<td>类型</td>\n' +
        '<td>难度</td>\n' +
        '<td>通过率</td>\n' +
        '</tr>\n' +
        '</thead>\n' +
        '<tbody id="questTabs"></tbody>\n' +
        '</table> \n' +
        '<div class="paging-area-box mt-10 magin-auto">\n' +
        '<div class="paging-area float-left" id="pagination"></div>\n' +
        '<span class="pageNum float-right f-14">共<em>0</em>条数据</span>\n' +
        '</div>';
    html += '<style>\n' +
        ' \n' +
        ' .problemListTab tr td:nth-child(2),\n' +
        ' .problemListTab tr td:nth-child(4){\n' +
        'border-left:1px solid #333;\n' +
        'border-right:1px solid #333;\n' +
        '}\n' +
        '.problemListTab tr td:nth-child(6){\n' +
        'border-left:1px solid #333;\n' +
        '}\n' +
        '</style>';
    getHref_path();
    $(".menu ul").hide();
    $(".menu ul").eq(2).show();
    document.getElementById("ui-right-content").innerHTML = html;
    problemListFun(1);
}
function problemListFun(pageNo){
    var id = window.document.getElementById("questTabs");
    $.ajax({
        url: get_questionAll_interface+'?currentPage='+pageNo,
        type:'post',
        dataType:'json',
        xhrFields:{
            withCredentials:true
        },
        crossDomain:true,
        data:{
            currentPage:pageNo
        },

        success: function(data) {
            if(data.code==601){
                inner_problemListTbody(data,id, problemListFun);
            }else{
                $.message(data.msg);
            }
        },
        error: function (error) {
            $.message("链接超时，请刷新...");
        }
    });
}
function inner_problemListTbody(data,id, func){
    var page = data.data.num;
    var currentPage = data.data.currentPage;
    var tml = "";
    $(".pageNum em").html(page);
    if(page>0){
        setPagination(page,currentPage, func);
        var list = data.data.list;
        $('#pagination').show();
        for (x in list) {
            tml += "<tr>"+
                '<td>'+list[x]["questionId"]+'</td>' +
                '<td>'+list[x]["questionTitle"]+'</td>' +
                '<td>'+list[x]["questionType"]+'</td>' +
                '<td>'+list[x]["questionDifficulty"]+'</td>' +
                '<td>'+list[x]["passPercent"]+'</td>' +
                "</tr>" ;
        }
    }else{
        $('#pagination').hide();
    }
    id.innerHTML = tml;
}